package files;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;

public class FileRead {

	private static final int BUF_SIZE = 10240;

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		File f = new File("D:\\Tsgesamtgnd.mrc");
		FileReader fr = new FileReader(f);
		InputStreamReader ir = new InputStreamReader(System.in);
		BufferedReader console = new BufferedReader(ir);

		char[] cbuf = new char[BUF_SIZE];
		int read = fr.read(cbuf);

		while (read != -1) {
			print(cbuf);
			console.readLine();
//			Thread.sleep(100);
			read = fr.read(cbuf);
		}

	}

	private static void print(char[] cbuf) {
		int lineWidth = 70;
		int row = 0;
		for (int i = 0; i < cbuf.length; i++) {
			row++;
			System.out.print(cbuf[i]);
			if(row == lineWidth) {
				System.out.println();
				row = 0;
			}
		}
		
	}

}
